<%@ Control Language="C#" AutoEventWireup="false"   Inherits="CVCommunity.Admin.Board" %>
<%@ Register tagPrefix="forum" namespace="CVCommunity.Provider" assembly="CVCommunity.Provider"%>

<form runat="server" onsubmit="return checknumber();">
<script language="javascript">
var boards = [];
<%=BoardArray%>
function InitSubList(categoryid)
{
	var obj = document.getElementById("parentid");
	obj.length = 0;
	obj.options[0] = new Option("不作为子版面 (默认)", 0);
	if (categoryid < 1)
	{
		return;
	}
	var max = boards.length;
	for (var i=0; i<max; i++)
	{
		if (boards[i][2] == categoryid)
		{
			obj.options[obj.length] = new Option(boards[i][0], boards[i][1]);
		}
	}
}

function SelectSubList(parentid)
{
	var obj = document.getElementById("parentid");
	for(var i = 0; i < obj.options.length; i++)
	{
		if (parentid == obj.options[i].value)
			obj.options[i].selected = true;
	}
}


</script>
<div class="grid">
<table cellspacing="0" class="inner">
<tr class="forumno category">
<td>版面管理</td>
</tr>
<tr class="forumtd">
<td><a href="?action=board&operation=list">&rsaquo;&rsaquo;&nbsp;版面列表</a>&nbsp;&nbsp;&nbsp;<a href="?action=board&operation=add">&rsaquo;&rsaquo;&nbsp;添加版面 </a></td>
</tr>
</table>
</div>
<asp:Panel ID="AddPanel" Visible="false" runat="server">
<div class="grid">
<table cellspacing="0" class="inner" style="font-size:12px">
<tr class="forumno">
<td width="139">版面名称</td>
<td width="577"><asp:TextBox ID="Name" class="input2" onBlur="this.className='input2'" onFocus="this.className='input1'" runat="server" />
*
<asp:RequiredFieldValidator
		  		 ControlToValidate="Name"
				 ErrorMessage="必须填写版面名称" 
				 EnableClientScript="true" 
				 runat="server" /></td>
</tr>
<tr class="forumtd">
<td>所属版区</td>
<td><asp:DropDownList ID="CategoryId" runat="server"></asp:DropDownList>
<asp:RequiredFieldValidator ControlToValidate="CategoryId" ErrorMessage="请选择版区" runat="server" EnableClientScript="true" /></td>
</tr>
<tr class="forumtd">
<td valign="top">父级版面</td>
<td><select id="parentid" name="parentid" style="width:180px" onmousewheel="return false">
<option value="0">请先选择版区...</option>
</select></td>
</tr>
<tr class="forumtd">
<td>版面缩图</td>
<td><asp:TextBox ID="Icon" Width="300" class="input2" onBlur="this.className='input2'" onFocus="this.className='input1'" runat="server" />
图片相对路径</td>
</tr>
<tr class="forumtd">
<td valign="top">版面描述<br />
<span class="t1">250个字符以内<br />
支持 UBB √</span>
</td>
<td>
<script src="../scripts/common.js"></script>
<script src="../scripts/ubb.js"></script>
<script src="../scripts/ubbeditor.js"></script>
<script>CreateUbbEditor('Desc', 15, '../');</script>
<textarea name="Desc" rows="2" cols="25" id="Desc" class="input2" onBlur="this.className='input2'" onFocus="this.className='input1'" style="height:100px;width:98%;"><%=DescText%></textarea>
</td>
</tr>
<tr class="forumtd">
<td valign="top">版面公告<br />
<span class="t1">支持 UBB √</span></td>
<td>
<script src="../scripts/common.js"></script>
<script src="../scripts/ubb.js"></script>
<script src="../scripts/ubbeditor.js"></script>
<script>CreateUbbEditor('Announcement', 15, '../');</script>
<textarea name="Announcement" rows="2" cols="25" id="Announcement" class="input2" onBlur="this.className='input2'" onFocus="this.className='input1'" style="height:100px;width:98%;"><%=AnnouncementText%></textarea>
</td>
</tr>
<tr class="forumtd">
<td>&nbsp;</td>
<td><asp:CheckBox ID="Hidden" CssClass="smallbox" runat="server" />
隐藏版面</td>
</tr>
<tr class="forumtd">
<td>&nbsp;</td>
<td><asp:CheckBox ID="Horizontal" CssClass="smallbox" runat="server" />
子版横向排列&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;列数
<asp:TextBox ID="Columns" class="input2" onBlur="this.className='input2'" onFocus="this.className='input1'" runat="server" Width="40" Text="2" alt='numeric'/></td>
</tr>
<tr class="forumtd">
<td colspan="4" align="center"><asp:Button Text=" 提交 " class="button" OnClick="Save" runat="server" /></td>
</tr>
</table></div>
</asp:Panel>
<asp:Panel ID="list" runat="server">
<div class="grid">
<table cellspacing="0" class="inner" style="font-size:12px;">
<tr>
<td height="17" colspan="4">&nbsp;</td>
</tr>
<asp:Repeater enableviewstate="false" id="incategory" runat="server">
<ItemTemplate>
<tr class="forumtd" style="background:#FFFFFF;" id="cat" visible="false" runat="server">
<td width="100"></td>
<td>版块名称</td>
<td width="150" align="center">主题&nbsp;/&nbsp;帖子</td>
<td width="200">权限功能设置</td>
</tr>

<tr class="forumtd">
<td width="100"><forum:Anchor id="alter" style="color:#AC4E0F;" text="修改" runat="server"/>
|
<forum:Anchor id="remove" style="color:#555;" text="删除" runat="server" onclick="return confirm('删除后将无法再恢复，确定要删除吗？');"/></td>
<td align="left" id="indent" runat="server"><forum:Place id="sortids" runat="server" />
<asp:label id="boardname" runat="server"/></td>
<td width="150" align="center"><asp:label id="topics" runat="server"/>
/
<asp:Label ID="posts" runat="server"/></td>
<td width="250">
<forum:Anchor id="bstyle" style="color:#006666;" text="风格" runat="server" />
|
<forum:Anchor id="moderator" style="color:#006666;" text="版主" runat="server" />
|
<forum:Anchor id="restrict" style="color:#339999;" text="访问限制" runat="server" />
|
<forum:Anchor id="permit" style="color:#669966" text="许可证" runat="server" />
|
<forum:Anchor id="subject" style="color:#999900;" text="专题" runat="server" /></td>
</tr>
</ItemTemplate>
</asp:Repeater>
<tr class="forumtd">
<td colspan="4" align="center"><asp:Button Text="  保存  " CssClass="button" OnClick="ReOrder" runat="server" /></td>
</tr>
</table>
</div>
</asp:Panel>
<script>
<%=InitModify%>
</script>
</form>